<template>
    <div class="{{_type}}-wrapper">
        <h4 v-if="title" class="title" v-html="title"></h4>
        <div v-if="des" class="tip" v-html="des"></div>
    </div>
</template>
<script>
import { tranSpaceAndEnter } from '@core/util/xss';

export default {
    name: '{{type}}',
    props: {
        compJson: Object,
    },
    computed: {
        title() {
            return tranSpaceAndEnter(this.compJson.properties.formRelevant.title.content);
        },
        des() {
            return tranSpaceAndEnter(this.compJson.properties.formRelevant.des.content);
        },
    },
};
</script>
<style scoped lang="scss">
.title {
    margin: 0 0 9px;
    line-height: 1.4;
    word-break: break-all;
    color: var(--title-color);
    font-weight: var(--title-fontWeight);
    font-size: var(--title-fontSize);
}
.tip {
    height: auto !important;
    font-size: 12px;
    line-height: 1.4;
    word-break: break-all;
    margin-bottom: 8px;
}
</style>
